using System;
using System.ComponentModel;
using System.Data;
using System.Runtime.Serialization;

namespace MinCultura.Sipa.DataAccess.EntidadesArtes
{
	/// <summary>
	/// A custom serializable dataset containing 
	/// </summary>
	[Serializable()]
	[DesignerCategory("code")]


	/// <summary>Class for handling datasets</summary>  
		public class EspacioPrincipalData : DataSet
	{
		///
		/// Constants for table and fields mapping
		///
		public const string ART_ESPACIO_PRINCIPAL_TABLE = "ART_ESPACIO_PRINCIPAL";

		public const string EEP_ID_FIELD = "EEP_ID";
		public const string EEP_NOMBRE_FIELD = "EEP_NOMBRE";


		protected EspacioPrincipalData(SerializationInfo info, StreamingContext context)
		{
			//
		}

		public EspacioPrincipalData()
		{
			BuildDataTables();
		}

		/// <summary>
		/// Creates the following datatables: Localidades
		/// </summary>
		private void BuildDataTables()
		{
			DataTable table;
			DataColumnCollection columns;
			table = new DataTable(ART_ESPACIO_PRINCIPAL_TABLE);
			columns = table.Columns;

			columns.Add(EEP_ID_FIELD, typeof (Decimal));
			
			columns.Add(EEP_NOMBRE_FIELD, typeof (String));
			columns[EEP_NOMBRE_FIELD].Caption = "Nombre";

			this.Tables.Add(table);
		}

		/// <summary>
		/// Add a new row to the table
		/// </summary>
		/// <param name="row">Dataset row
		public void addEspacioPrincipal(DataRow row)
		{
			this.Tables[ART_ESPACIO_PRINCIPAL_TABLE].Rows.Add(row);
		}

	}

}